#!/bin/bash
#make a tmpfile
#use devtoolset manage gcc version
yum install -y centos-release-scl scl-utils-build
#install gcc-8.x.x
yum install -y devtoolset-8-toolchain
#scl enable devtoolset-8 bash
source /opt/rh/devtoolset-8/enable

# set to env
gcc --version
# echo "source /opt/rh/devtoolset-8/enable">>/etc/profile
# source /etc/profile
# reboot